FROM node:14-alpine3.12

ENV VER 0.0.1

COPY . /opt/devs/xiuxian

WORKDIR /opt/devs/xiuxian

# 添加FFmpeg依赖
RUN cp /etc/apk/repositories /etc/apk/repositories.bak && \
    sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
    apk update && \
    apk add --no-cache libstdc++ g++ gcc gnupg binutils-gold libgcc linux-headers make python2 python3 ffmpeg git && \
    npm install -g cnpm

EXPOSE 3005

CMD cnpm install && npm run dev